\section{HVACTemplate Processing}\label{hvactemplate-processing}

\textbf{Unlike other EnergyPlus objects, the HVACTemplate objects are not handled by EnergyPlus directly.} Instead, they are preprocessed by a program called ExpandObjects. If you use EP-Launch or RunEPlus.bat, this preprocessor step is performed automatically using the following sequence:

\begin{enumerate}
\def\labelenumi{\arabic{enumi})}
\item
  The preprocessor program, ExpandObjects, reads your IDF file and converts all of the HVACTemplate objects into other EnergyPlus objects.
\item
  The ExpandObjects program copies the original idf file with the HVACTemplate objects commented out (i.e., inserts a ``!'' in front of the object name and its input fields) plus all of the new objects created in Step 1 and writes a new file which is saved with the extension ``expidf''. This ``expidf'' file may be used as a standard EnergyPlus IDF file if the extension is changed to idf; however, for safety's sake, both filename and extension should be changed.
\item
  The EnergyPlus simulation proceeds using the expidf file as the input stream.
\item
  If there are error messages from EnergyPlus, they will refer to the contents of the expidf file. Specific objects referred to in error messages may exist in the original idf, but they may be objects created by ExpandObjects and only exist in the expidf. Remember that the expidf will be overwritten every time the original idf is run using EP-Launch or RunEPlus.bat.
\end{enumerate}

If you are trying to go beyond the capabilities of the HVACTemplate objects, one strategy you can use is to start your specification using the HVACTemplate objects, run EnergyPlus using EP-Launch and producing an expidf file, rename that file and start making modifications. This approach may help with getting all of the objects needed and the node names set consistently.

\textbf{Users need to remember that no objects related to HVAC except for HVAC template objects are needed in the IDF file.} The existence of other objects (unless specifically described in the following sections) may cause unexpected errors to occur. \hyperref[sizingzone]{Sizing:Zone}, \hyperref[sizingsystem]{Sizing:System}, and \hyperref[sizingplant]{Sizing:Plant} objects will be generated by the corresponding HVACTemplate objects; the user does not need to create these elsewhere in the input file.

There are some exceptions to this rule:

\begin{itemize}
\item
  \hyperref[hvactemplateplantchillerobjectreference]{HVACTemplate:Plant:Chiller:ObjectReference} which requires that the corresponding chiller object be present in the idf file along with any required curve or performance objects. In this case, the HVACTemplate object does not create the chiller object, but adds all of the connections. \hyperref[hvactemplateplanttowerobjectreference]{HVACTemplate:Plant:Tower:ObjectReference} and \hyperref[hvactemplateplantboiler]{HVACTemplate:Plant:Boiler};ObjectReferences are similar.
\item
  For HVACTemplate:Zone:* objects, if Outdoor Air Method = \emph{DetailedSpecification}, then any referenced \hyperref[designspecificationoutdoorair]{DesignSpecification:OutdoorAir} or \hyperref[designspecificationoutdoorairspacelist]{DesignSpecification:OutdoorAir:SpaceList} and \hyperref[designspecificationzoneairdistribution]{DesignSpecification:ZoneAirDistribution} objects must be present in the idf file.
\item
  For \hyperref[hvactemplatezonevav]{HVACTemplate:Zone:VAV} and \hyperref[hvactemplatezonedualduct]{HVACTemplate:Zone:DualDuct}, if a Design Specification Outdoor Air Object Name for Control is specified, then the referenced \hyperref[designspecificationoutdoorair]{DesignSpecification:OutdoorAir} or \hyperref[designspecificationoutdoorairspacelist]{DesignSpecification:OutdoorAir:SpaceList} object must be present in the idf file.
\end{itemize}
